package com.example.lexiangbackend.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

public class MusicUploadRequest {
    
    @NotBlank(message = "音乐标题不能为空")
    private String title;
    
    @NotBlank(message = "艺术家不能为空")
    private String artist;
    
    @NotNull(message = "分类ID不能为空")
    private Long categoryId;
    
    private Integer duration; // 时长(秒)
    
    private Long playCount; // 播放次数
    
    // 上传类型：URL 或 FILE
    @NotBlank(message = "上传类型不能为空")
    private String uploadType; // "URL" 或 "FILE"
    
    // 外部音乐URL（当uploadType为URL时必填）
    private String externalUrl;
    
    @NotBlank(message = "音乐文件URL不能为空")
    private String musicUrl;
    
    private String coverUrl; // 封面图片URL
    
    // 构造函数
    public MusicUploadRequest() {}

    // Getters and Setters
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getArtist() {
        return artist;
    }

    public void setArtist(String artist) {
        this.artist = artist;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public Long getPlayCount() {
        return playCount;
    }

    public void setPlayCount(Long playCount) {
        this.playCount = playCount;
    }

    public String getUploadType() {
        return uploadType;
    }

    public void setUploadType(String uploadType) {
        this.uploadType = uploadType;
    }

    public String getExternalUrl() {
        return externalUrl;
    }

    public void setExternalUrl(String externalUrl) {
        this.externalUrl = externalUrl;
    }

    public String getMusicUrl() {
        return musicUrl;
    }

    public void setMusicUrl(String musicUrl) {
        this.musicUrl = musicUrl;
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }
} 